<!DOCTYPE html>
<html>
<script src="full-screen-test.js"></script>
<body onload="init()">
<p>Test passes if it does not crash.</p>
<div id="div1">
<script>
var init = function() {
    runWithKeyDown(function() { div1.webkitRequestFullScreen() });

    frameset1 = document.createElementNS("http://www.w3.org/1999/xhtml", "frameset");
    document.body.appendChild(frameset1);
    setTimeout("crash()", 0);
};

function crash() {
    frameset1.appendChild(div1);
    if (window.eventSender)
        eventSender.keyDown("X");
    endTest();
}
</script>
</html>
